package cn.kgc.cloud.controller;

import cn.kgc.cloud.client.HystrixClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 课工场
 * @date 2024/1/5
 * @description
 */
@RestController
@RequestMapping("hf")
public class HystrixFeignController {

    @Resource
    private HystrixClient hystrixClient;

    @GetMapping
    public String  method1(Integer id){

        String s = hystrixClient.method1(id);
        return "HystrixFeign service ok  invoke hystrixService result =  "+s;
    }
}
